package com.vegetable.modules.entity.quotation;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @description quotation
 * @author BEJSON
 * @date 2024-04-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="报价单", description="报价单")
public class Quotation  implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 商品类型
     */
    @ApiModelProperty(value = "商品类型")
    private String productType;

    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    private String productName;

    @ApiModelProperty(value = "商品价格")
    private BigDecimal topPrice;

    @ApiModelProperty(value = "商品价格")
    private BigDecimal lowPrice;

    @ApiModelProperty(value = "单个的价格")
    private BigDecimal numPrice;

    @ApiModelProperty(value = "地区Id")
    private Long areaId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "商品类型")
    private Date updateTime;

    @ApiModelProperty(value = "今明两天价格趋势, 1上升 -1下降 0不变 -2未更新")
    @TableField(exist = false)
    private Integer priceTrend = -2;

    @ApiModelProperty(value = "今明两天价格区别")
    @TableField(exist = false)
    private BigDecimal priceDiff = BigDecimal.ZERO;

    @ApiModelProperty(value = "规格id")
    private Long specsId;

    @ApiModelProperty(value = "商品id")
    private Long commodityId;

    @ApiModelProperty(value = "排序")
    private Integer sort;

}
